<!doctype html>
<html lang="{idioma_js}">
    <head>
        <title>CMS 2.0+ | {header_titulo} | Link Nacional</title>
        {include_header_view}
        <script>
            $(window).load(function(){
                $('#from_cad_conteudo').wl_Form({
                    dataType: 'json',
                    onSuccess: function (data) {
                        if(data.cod == 999){
                            //$.wl_Alert(data.msg,'success','#content');
                            $.msg(data.msg,{header:data.header,live:10000});
                            $('#from_cad_conteudo #id').val(data.id);
                        } else {
                            //$.wl_Alert(data.msg,'warning','#content');
                            $.msg(data.msg,{header:data.header,live:10000});
                            $('#from_cad_conteudo').color_campos_form({
                                campos:data.campos
                            });
                        }
                    }
                });
            });    
            // DEFINIÇÕES DE UPLOAD
           
            var url_upload = '{base_cms}{imagens_imagem_gravar}';
            var allowedExtensions =  ['png','jpeg', 'gif', 'jpg'];
            var autoUpload = true;
            var maxNumberOfFiles = 1;
            var multiple = false;
            var paramName = 'imagens'; // nome campo file
            
        </script>
    </head>
    <body>

        {include_body_header_view}
        {include_body_menu_left_view}

        <section id="content">
            <div class="g12">

                <h1>{header_titulo}</h1>

                <p>{descricao_tela}</p>

                <form id="from_cad_conteudo" name="from_cad_conteudo" action="{base_cms}{action_conteudo_gravar}" method="post" autocomplete="off">
                    <input type="hidden" value="{id}" name="id" id="id" />
                    <input type="hidden" value="{conteudo_pai_id}" name="conteudo_pai_id" id="conteudo_pai_id" />

                    <fieldset>
                        <label>{title_acao}</label>
                        <section>
                            <label for="titulo">{lang_titulo}</label>
                            <div>
                                <input title="{lang_titulo}" type="text" id="titulo" name="titulo" value="{titulo}" required="required" />
                            </div>
                        </section>

                        <section>
                            <label for="conteudo_categoria_id">{lang_conteudo_categoria_id}</label>
                            <div>
                                {conteudo_categoria_id}
                            </div>
                        </section>

                        <section>
                            <label for="status">{lang_status}</label>
                            <div>
                                {status}
                            </div>
                        </section>

                        <section>
                            <label for="imagens_id">{lang_imagens_id}</label>
                            <div>
                                <input title="{lang_imagens_id}" type="file" id="imagens_id" name="imagens_id" value="{imagens_id}" />
                            </div>
                        </section>

                        <section>
                            <label for="imagens_galeria_id">{lang_imagens_galeria_id}</label>
                            <div>
                                {imagens_galeria_id}
                            </div>
                        </section>

                        <section>
                            <label for="texto">{lang_texto}</label>
                            <div>
                                <textarea name="texto" id="texto" class="html">{texto}</textarea>
                            </div>
                        </section>

                    </fieldset>

                    <section>
                        <div>
                            <button class="reset">{lang_title_reset}</button>
                            <button class="submit">{lang_title_submit}</button>
                        </div>
                    </section>
            </div>
        </form>
    </div>
    <div>
        <h1>{lang_revisoes}
            <span></span>
        </h1>


        <table class="documentation">
            <thead>
                <tr>
                    <th>{lang_id}</th>
                    <th>{lang_titulo}</th>
                    <th>{lang_status}</th>
                    <th>{lang_acao}</th>
                </tr>
            </thead>
            <tbody>
                {revisoes}
                <tr>
                    <td>{id}</td>
                    <td>{titulo}</td>
                    <td>{status}</td>
                    <td>{acao}</td>
                </tr>
                {/revisoes}
            </tbody>
        </table></div>
</section>
<footer>
    {include_footer_view}
</footer>
</body>
</html>